package agenda.database.entities;

import java.util.Date;

import agenda.extra.Utils;

/**
 * @author sPeC!
 * 
 */
public class Trabalho
{
	private long id;
	private String course;
	private Date deliverDate;
	private int requiredHours;
	private String description;
	private boolean finished;
	private int remainingHours;

	public int getRemainingHours()
	{
		return remainingHours;
	}
	
	public void setRemaingHours(int _newVal)
	{
		remainingHours = _newVal;
	}
	
	public long getId()
	{
		return id;
	}

	public String getCourse()
	{
		return course;
	}

	public Date getDeliverDate()
	{
		return deliverDate;
	}
	
	public String getDeliverDateAsString()
	{
		return Utils.dateTimeToString(deliverDate);
	}

	public int getRequiredHours()
	{
		return requiredHours;
	}

	public String getDescription()
	{
		return description;
	}

	public boolean isFinished()
	{
		return finished;
	}
	
	public void isFinished(boolean _isFinished)
	{
		 finished = _isFinished;
	}

	public Trabalho(long id, String course, String deliverDate, int requiredHours, String description, int remainingHours, int finished)
	{
		this.id = id;
		this.course = course;
		this.deliverDate = Utils.stringToDateTime(deliverDate);
		this.requiredHours = requiredHours;
		this.description = description;
		this.finished = !(finished==0);
		this.remainingHours = remainingHours;
	}

}